/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * ventas_sie_diarioventas_cajaoperaciones.java
 *
 * Created on 22/11/2012, 11:34:33 AM
 */

package sie_invdis;



import java.awt.print.PrinterException;
import java.sql.*;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.*;


import javax.swing.JOptionPane;
import javax.swing.JTable;
import javax.swing.JTable.*;
import java.awt.*;
import java.awt.event.*;
import java.util.Date;
import java.util.Calendar;
import java.text.SimpleDateFormat;
import java.text.ParseException;
import java.text.*;
import javax.swing.table.DefaultTableCellRenderer;
/**
 *
 * @author Administrador
 */
public class ventas_sie_diarioventas_cajaoperaciones extends javax.swing.JFrame {

         private javax.swing.table.DefaultTableModel  jtable_modelo_cuentaefe_detalle;

         bd_conexion x = new bd_conexion() ;
       //se creaa la variable resultset
     private java.util.Date fechahoy=new Date();
          ResultSet rs = null;
     private SimpleDateFormat formateadoresta = new SimpleDateFormat("yyyy-MM-dd");
     private DecimalFormat miforma = new DecimalFormat("#########.##");
     private SimpleDateFormat formateador = new SimpleDateFormat("dd-MM-yyyy");
     private SimpleDateFormat formateadiasem = new SimpleDateFormat("yyyy-MM-dd");
       private int cambiomm=1,buscamp=3,combolisto=0;
    /** Creates new form ventas_sie_diarioventas_cajaoperaciones */
    public ventas_sie_diarioventas_cajaoperaciones() {
             this.iniciar_modelo_cuentaefectivo_detalle();
        initComponents();

          this.loadcombo_cuentaefe();
        this.loadcombo_efectivoconceptos();
        this.loadcombo_depa(1,"");
         Calendar fechamesini = Calendar.getInstance(); // obtiene la fecha actual

        this.jdc_fechamovefe.setDate(fechamesini.getTime());
        this.jtf_iddepto.setText(variables_global.getdepartamento());

        this.jtf_busiddeptoorigen.setText(variables_global.getdepartamento());

        this.carga_datos_depa(2,String.valueOf(variables_global.getdepartamento()));

        jtb_cuentaefectivo_detalle.getColumnModel().getColumn(0).setPreferredWidth(10);//Id
        jtb_cuentaefectivo_detalle.getColumnModel().getColumn(1).setPreferredWidth(80);//Status.
        jtb_cuentaefectivo_detalle.getColumnModel().getColumn(2).setPreferredWidth(120);//Opero
        jtb_cuentaefectivo_detalle.getColumnModel().getColumn(3).setPreferredWidth(80);//Concepto
        jtb_cuentaefectivo_detalle.getColumnModel().getColumn(4).setPreferredWidth(55);//Fecha/hora
        jtb_cuentaefectivo_detalle.getColumnModel().getColumn(5).setPreferredWidth(120);//Recibio
        jtb_cuentaefectivo_detalle.getColumnModel().getColumn(6).setPreferredWidth(40);//ref
        jtb_cuentaefectivo_detalle.getColumnModel().getColumn(7).setPreferredWidth(20);//Importe.
        jtb_cuentaefectivo_detalle.getColumnModel().getColumn(8).setPreferredWidth(10);//Importe.
        jtb_cuentaefectivo_detalle.getColumnModel().getColumn(9).setPreferredWidth(20);//Importe.
        jtb_cuentaefectivo_detalle.getColumnModel().getColumn(10).setPreferredWidth(40);//Historial
        jtb_cuentaefectivo_detalle.getColumnModel().getColumn(11).setPreferredWidth(150);//Obserbaciones
        jtb_cuentaefectivo_detalle.getColumnModel().getColumn(12).setPreferredWidth(80);//Obserbaciones

        this.buttonGroup1.setSelected(jrbtn_cambiodev.getModel(), true);
        this.buttonGroup2.setSelected(jrb_bfechab.getModel(), true);

        this.carga_datos_cuentaefe_movimientos(3,this.jtf_busidcuenta.getText(),this.jtf_busiddeptoorigen.getText(),this.fechaamericana(fechahoy));
        this.jtf_busquedaactual.setText(this.fechaamericana(fechahoy));
        combolisto=1;
    }

       private void iniciar_modelo_cuentaefectivo_detalle()
{
        jtable_modelo_cuentaefe_detalle=new javax.swing.table.DefaultTableModel();//Creo el modelo

        jtable_modelo_cuentaefe_detalle.addColumn("<html><BODY><b>Id</b></BODY></html>");
        jtable_modelo_cuentaefe_detalle.addColumn("<html><BODY><b>St/Origen</b></BODY></html>");
        jtable_modelo_cuentaefe_detalle.addColumn("<html><BODY><b>Opero</b></BODY></html>");
        jtable_modelo_cuentaefe_detalle.addColumn("<html><BODY><b>Concepto</b></BODY></html>");
        jtable_modelo_cuentaefe_detalle.addColumn("<html><BODY><b>Fecha/Hora</b></BODY></html>");
        jtable_modelo_cuentaefe_detalle.addColumn("<html><BODY><b>Recibio</b></BODY></html>");
        jtable_modelo_cuentaefe_detalle.addColumn("<html><BODY><b>Ref</b></BODY></html>");
        jtable_modelo_cuentaefe_detalle.addColumn("<html><BODY><b>Subtotal</b></BODY></html>");
        jtable_modelo_cuentaefe_detalle.addColumn("<html><BODY><b>Cambio</b></BODY></html>");
         jtable_modelo_cuentaefe_detalle.addColumn("<html><BODY><b>Total</b></BODY></html>");
        jtable_modelo_cuentaefe_detalle.addColumn("<html><BODY><b>Historial</b></BODY></html>");
        jtable_modelo_cuentaefe_detalle.addColumn("<html><BODY><b>Observacion</b></BODY></html>");
        jtable_modelo_cuentaefe_detalle.addColumn("<html><BODY><b>Depto Destino</b></BODY></html>");
}

    private void loadcombo_cuentaefe()
 {
            this.jcmbx_cuenta.addItem("0:Elegir Cuenta");
            try
            {
                rs = x.sieuno_executediversosv2("select * from x1_supervision_departamen_caja_cuentaefec() as (id smallint,descrip text);",variables_global.getconexiongral());
               while (rs.next())
                    {
                      this.jcmbx_cuenta.addItem(rs.getString("id")+":"+rs.getString("descrip"));

                    }
             }
            catch(Exception e)
            {
                System.out.println(e.getMessage());
            }
    }

private void loadcombo_efectivoconceptos()
 {
            this.jcmbx_concepto.addItem("0:Elegir Concepto");
             this.jcmbx_conceptofiltro.addItem("0:Todos");
            try
            {
                rs = x.sieuno_executediversosv2("select * from x1_supervision_departamen_caja_efeconceptos() as (id smallint,descrip text,valores smallint, obser text);",variables_global.getconexiongral());
               while (rs.next())
                    {
                      this.jcmbx_concepto.addItem(rs.getString("id")+":"+rs.getString("descrip"));
                      this.jcmbx_conceptofiltro.addItem(rs.getString("id")+":"+rs.getString("descrip"));
                    }
             }
            catch(Exception e)
            {
                System.out.println(e.getMessage());
            }
    }

private void carga_datos_depa(int opcion,String busca){
        String texto="select * from x1_supervision_departamentos_catalogo("+opcion+",'"+busca+"','') as (id smallint,descrip character varying(80));";
            try
            {
                  rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
               while (rs.next())
                    {
                     this.jtf_iddeptodescribe.setText(rs.getString("descrip"));
                    }
             }
            catch(Exception e)
            {
                System.out.println(e.getMessage());
            }
    }
private void loadcombo_depa(int opcion,String busca){
        String texto="select * from x1_supervision_departamentos_catalogo("+opcion+",'"+busca+"','') as (id smallint,descrip character varying(80));";
            this.jcmbx_departamento.addItem("0:Elegir Departamento");
            try
            {
                  rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
               while (rs.next())
                    {
                      this.jcmbx_departamento.addItem(rs.getString("id")+":"+rs.getString("descrip"));
                    }
             }
            catch(Exception e)
            {
                System.out.println(e.getMessage());
            }
    }
private void carga_datos_emprealiza(String codigo)
    {
       //invoco al metodo que trae el recordset de datos
    int encontro=0;
    String realiza="",idrealiza="";

        try
         {
       rs = x.sieuno_executediversosv2("select * from x1sieuno_articulo_inven_det_aplicadoresv2('"+codigo+"') as (id integer,nom character varying(50),pat character varying(50));",variables_global.getconexiongral());
            while (rs.next())
                {
                    encontro=1;
                    idrealiza=rs.getString("id");
                    realiza=rs.getString("nom")+" "+rs.getString("pat");

                }

        }
        catch(Exception e)
        {
            System.out.println(e.getMessage());
        }
       if (encontro==1)
              {
                  if(JOptionPane.showConfirmDialog(null, "Realiza:"+realiza+" Esta Correcto?")==0)
                        {
                            this.jtf_idelabora.setText(idrealiza);
                            this.jtf_empleadonombrere.setText(realiza);
                            this.jtf_codelabora.setText("");
                            this.jtf_codconfirmaconteo.requestFocus();
                            encontro=0;
                        }
                  else
                        {
                            this.jtf_codelabora.requestFocus();
                            this.jtf_codelabora.setText("");
                            encontro=0;
                        }
              }
       else
           {
               this.jtf_codelabora.requestFocus();
               this.jtf_codelabora.setText("");
               JOptionPane.showMessageDialog(null,"Error No existe el Empleado", "Sistema Integral(Inventarios: Alta) : Ayuda",1);
               encontro=0;
           }
      }
private void carga_datos_empsupervisa(String codigo)
    {
       //invoco al metodo que trae el recordset de datos
    int encontro=0;
    String realiza="",idrealiza="";
       rs = x.sieuno_executediversosv2("select * from x1sieuno_articulo_inven_det_aplicadoresv2('"+codigo+"') as (id integer,nom character varying(50),pat character varying(50));",variables_global.getconexiongral());
        try
         {
            while (rs.next())
                {
                    encontro=1;
                    idrealiza=rs.getString("id");
                    realiza=rs.getString("nom")+" "+rs.getString("pat");
                }

        }
        catch(Exception e)
        {
            System.out.println(e.getMessage());
        }
       if (encontro==1)
              {
                  if(JOptionPane.showConfirmDialog(null, "Supervisa:"+realiza+" Esta Correcto?")==0)
                        {
                            this.jtf_idconfirma.setText(idrealiza);
                            this.jtf_codconfirmaconteo.setText("");
                            this.jtf_empleadonombreent.setText(realiza);
                            encontro=0;
                            this.jtf_efvocantidad.requestFocus();
                        }
                  else
                        {
                            this.jtf_codconfirmaconteo.requestFocus();
                            this.jtf_codconfirmaconteo.setText("");
                            encontro=0;
                        }
              }
       else
           {
               this.jtf_codconfirmaconteo.requestFocus();
               this.jtf_codconfirmaconteo.setText("");
               JOptionPane.showMessageDialog(null,"Error No existe el Empleado", "Sistema Integral(Inventarios: Alta) : Ayuda",1);
               encontro=0;
           }
      }


private void carga_datos_cuentaefe_movimientos(int opcion,String busca,String busca1,String busca2)
 {
        DecimalFormat miformat = new DecimalFormat("############.##");
        while(jtable_modelo_cuentaefe_detalle.getRowCount()>0)jtable_modelo_cuentaefe_detalle.removeRow(0);
        Object[] fnewRow = new Object[13];
        String texto="select * from x1_supervision_departamen_caja__cuentaefec_movimientos("+opcion+",'"+busca+"','"+busca1+"','"+busca2+"') as (id integer,idstatus smallint,idcuenta smallint,idconcepto smallint,idempleado integer,fecha date,hora time,doctoref character varying(60),cantidad numeric,observacion text,describecuenta text,describeconcepto text,nombre character varying(50),nombrepat character varying(50),iddepto smallint,iddeptodes smallint,idempleadorec integer,nombrerec character varying(50),nombrepatrec character varying(50),descripdepa character varying(80), describedepades character varying(80),idfoliodepto integer,cambio numeric,total numeric);";
        System.out.println(texto);
        float saldo=0;
            try
            {
                rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
               while (rs.next())
                    {
                               saldo=saldo+(rs.getFloat("cantidad")+rs.getFloat("cambio"));
                               fnewRow[0]=rs.getString("idfoliodepto");
                               fnewRow[1]=rs.getString("idstatus")+":"+rs.getString("iddepto")+":"+rs.getString("descripdepa");
                               fnewRow[2]=rs.getString("idempleado")+":"+rs.getString("nombre")+":"+rs.getString("nombrepat");
                               fnewRow[3]=rs.getString("idconcepto")+":"+rs.getString("describeconcepto");
                               fnewRow[4]=this.fechaeuropea(rs.getString("fecha"))+" "+this.DiaSemana(this.fechaeuropea(rs.getString("fecha"))).substring(0, 2)+" "+rs.getString("hora").substring(0, 5);
                               fnewRow[5]=rs.getString("idempleadorec")+":"+rs.getString("nombrerec")+" "+rs.getString("nombrepatrec");
                               fnewRow[6]=rs.getString("doctoref");
                               fnewRow[7]=miformat.format(rs.getFloat("cantidad"));
                               fnewRow[8]=miformat.format(rs.getFloat("cambio"));
                               fnewRow[9]=miformat.format(rs.getFloat("total"));
                               fnewRow[10]=miformat.format(saldo);
                               fnewRow[11]=rs.getString("idcuenta")+":"+rs.getString("observacion");
                                fnewRow[12]=rs.getString("iddeptodes")+":"+rs.getString("describedepades");
                               jtable_modelo_cuentaefe_detalle.addRow(fnewRow);

                    }
             }
            catch(Exception e)
            {
                System.out.println(e.getMessage());
            }
        this.jtf_total.setText(miformat.format(saldo));


       this.jtf_totalletra.setText(this.PesosMN(saldo*-1));
}

private void dioclickcatpreparacion(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
         //System.out.println("dio doble  click");
         int filaalmacenes = jtb_cuentaefectivo_detalle.getSelectedRow();
         String folio=jtable_modelo_cuentaefe_detalle.getValueAt(filaalmacenes, 0).toString();
         this.jtf_folio.setText(folio);
         this.jtf_efvodoctorefup.setText(jtable_modelo_cuentaefe_detalle.getValueAt(filaalmacenes, 6).toString());
         String arreglo_ctades[]=jtable_modelo_cuentaefe_detalle.getValueAt(filaalmacenes, 11).toString().split(":");

         String deptoori[]=jtable_modelo_cuentaefe_detalle.getValueAt(filaalmacenes, 1).toString().split(":");

          this.jtf_idcuenta.setText(arreglo_ctades[0]);
          this.jtf_efvoobservacionesup.setText(arreglo_ctades[1]);

          this.jtf_iddeptoori.setText(deptoori[1]);

         this.jtf_efvodoctorefup.requestFocus();

    }

private void imprimir_efvocomprobante(String folio)
    {
     this.objimpresora=new com_distri_folios_imprimir();
     this.objimpresora.setOneItem_cadenas_a_imprimir(".");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Vale de Caja");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Cuenta:"+this.jcmbx_cuenta.getSelectedItem().toString()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Concepto:"+this.jcmbx_concepto.getSelectedItem().toString()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Folio: "+folio+""+"    Fecha:"+this.fechaeuropea(this.jdc_fechamovefe.getDate())+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Emp. Entrega:"+this.jtf_idelabora.getText()+":"+this.jtf_empleadonombrere.getText());
     this.objimpresora.setOneItem_cadenas_a_imprimir("Emp. Recibe:"+this.jtf_idconfirma.getText()+":"+this.jtf_empleadonombreent.getText());
     this.objimpresora.setOneItem_cadenas_a_imprimir("Docto Ref:"+this.jtf_efvodoctoref.getText()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Observ:  "+this.jtf_efvoobservaciones.getText().toUpperCase()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Importe:$"+this.jtf_efvocantidad.getText()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir(".");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Letra:"+this.jtf_efvocantidadletra.getText()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");

     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Recibio: ______________");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Autorizo: ______________");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("*");
     this.objimpresora.setObjeto_tabla(jtb_cuentaefectivo_detalle);
     this.objimpresora.imprimir_all(13,1);
    }
private void imprimir_efvoreporte(String folio)
    {
     this.objimpresora=new com_distri_folios_imprimir();
     this.objimpresora.setOneItem_cadenas_a_imprimir("    Reporte de Caja E/S Gastos");
     this.objimpresora.setOneItem_cadenas_a_imprimir("    Cuenta:"+this.jtf_busidcuenta.getText()+"");
      this.objimpresora.setOneItem_cadenas_a_imprimir("   Concepto:"+this.jcmbx_conceptofiltro.getSelectedItem().toString()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("    Depto:"+this.jtf_busiddeptoorigen.getText()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("    Fecha:"+this.fechaeuropea(fechahoy)+" Hora:"+fechahoy.getHours()+":"+fechahoy.getMinutes());
     this.objimpresora.setOneItem_cadenas_a_imprimir("*");
     this.objimpresora.setOneItem_cadenas_a_imprimir("  Total:"+this.jtf_total.getText()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir(".");
     this.objimpresora.setOneItem_cadenas_a_imprimir(" Importe:"+this.jtf_totalletra.getText()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("            Recibio: ______________");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("             Autorizo: ______________");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("*");
     this.objimpresora.setObjeto_tabla(jtb_cuentaefectivo_detalle);

     this.objimpresora.imprimir_all(12,0);
    }

private String PesosMN(float total)
{
float lyCantidad=0, lyCentavos=0,totalf=0;
int lnDigito=0, lnPrimerDigito=0, lnSegundoDigito=0, lnTercerDigito=0,lnNumeroBloques=0,lnBloqueCero=0,I=0;
String lcBloque="",lcbloquefinal="",pesosmn="",pesosmnfinal="",importetexto="",importepartido[]=null;
DecimalFormat miformat = new DecimalFormat("###,###,###,###");
DecimalFormat miformatint = new DecimalFormat("############.##");
importetexto=miformatint.format(total);
importetexto=importetexto.replace(".", ":");
importepartido=importetexto.split(":");
//lyCantidad =  (int) (Math.round(total));
lyCantidad=Integer.valueOf(importepartido[0]);
//System.out.println("dividir Primero::"+lyCantidad+" ");
lyCentavos = (total-lyCantidad ) * 100;

String laUnidades[] = {"UN", "DOS", "TRES", "CUATRO", "CINCO", "SEIS", "SIETE", "OCHO", "NUEVE", "DIEZ", "ONCE", "DOCE", "TRECE", "CATORCE", "QUINCE", "DIECISEIS", "DIECISIETE", "DIECIOCHO", "DIECINUEVE", "VEINTE", "VEINTIUN", "VEINTIDOS", "VEINTITRES", "VEINTICUATRO", "VEINTICINCO", "VEINTISEIS", "VEINTISIETE", "VEINTIOCHO", "VEINTINUEVE"};
String laDecenas[] = {"DIEZ", "VEINTE", "TREINTA", "CUARENTA", "CINCUENTA", "SESENTA", "SETENTA", "OCHENTA", "NOVENTA"};
String laCentenas[] = {"CIENTO", "DOSCIENTOS", "TRESCIENTOS", "CUATROCIENTOS", "QUINIENTOS", "SEISCIENTOS", "SETECIENTOS", "OCHOCIENTOS", "NOVECIENTOS"};
lnNumeroBloques = 1;
do
{
    lnPrimerDigito = 0;
    lnSegundoDigito = 0;
    lnTercerDigito = 0;

    lcBloque = "";
    lnBloqueCero = 0;
    for(I=1;I<4;I++)
		{
			lnDigito =  (int) (lyCantidad % 10);
            //System.out.println("mod Primero::"+lnDigito+" For"+I);
			if (lnDigito != 0)
				{
					switch(I)
					{
						case 1:
							lcBloque = " " + laUnidades[lnDigito - 1];
							lnPrimerDigito = lnDigito;
						break;
                        case 2:
							if(lnDigito <= 2){
                                    lcBloque = "  " + laUnidades[(lnDigito * 10) + lnPrimerDigito - 1];
								}
							else{
                                    lcbloquefinal=lcBloque;
                                    lcBloque = "  " + laDecenas[lnDigito - 1];
                                    if(lnPrimerDigito != 0){
                                        	lcBloque+=" Y";
                                        }
									 lcBloque+=lcbloquefinal;
								}
								lnSegundoDigito = lnDigito;
						break;
                        case 3:
								lcbloquefinal=lcBloque;
								lcBloque = " ";
								if((lnDigito == 1) && (lnPrimerDigito == 0) && (lnSegundoDigito == 0)){
										lcBloque+="CIEN";
									}
									lcBloque+=laCentenas[lnDigito - 1];
									lcBloque+=lcbloquefinal;
                                    lnTercerDigito = lnDigito;
						break;
					}
				}
			else{
					lnBloqueCero = lnBloqueCero + 1;
				}
//System.out.println("dividir antes::"+lyCantidad+" ");
		lyCantidad = (int)(lyCantidad / 10);
//System.out.println("dividir despues::"+lyCantidad+" ");
		if(lyCantidad == 0){
            			I=3;
                        //System.out.println("Fin del For:"+lyCantidad+" ");
                }
	}//fin del for
	switch(lnNumeroBloques)
	{
		case 1:
			pesosmn = lcBloque;
		break;
		case 2:
			pesosmnfinal=pesosmn;
			pesosmn = lcBloque;
				if(lnBloqueCero == 3)
					{}
				else{
					pesosmn+=" MIL";
				}
				pesosmn+=pesosmnfinal;
		break;
		case 3:
			pesosmnfinal=pesosmn;
			pesosmn = lcBloque;
			if((lnPrimerDigito == 1) && (lnSegundoDigito == 0) && (lnTercerDigito == 0))
				{
				pesosmn+=" MILLON";
				}
			else
				{
				pesosmn+=" MILLONES";
				}
			pesosmn+=pesosmnfinal;
		break;
	}
    //System.out.println("bloque:"+lcBloque+" ");
	lnNumeroBloques = lnNumeroBloques + 1;
}
while(lyCantidad != 0);
pesosmn="" + pesosmn;
if( total > 1)
{
	pesosmn+=" PESOS ";
}
else
{
	pesosmn+=" PESO ";
}
if(total==100)
    pesosmn="CIEN PESOS ";
pesosmn+=miformat.format(lyCentavos) + "/100 M.N.";
return pesosmn;
}

private String  fechaeuropea(String fecha) {

         //resibe cadena de fecha en formato americano yyyy-MM-dd
        java.util.Date fechaestaeuropa=null;
       SimpleDateFormat formateadorestaeuropa = new SimpleDateFormat("dd-MM-yyyy");
       String cadenafecha="";
        try
         {
          fechaestaeuropa = formateadoresta.parse(fecha);
         }
        catch (ParseException e)
          {
             //Error, la cadena de texto no se puede convertir en fecha.
          }
       cadenafecha= formateadorestaeuropa.format(fechaestaeuropa);
       return cadenafecha;

    }
 private String DiaSemana(String fe) {
         String dia = "";
       java.util.Date fecha=null;
         try
            {
             fecha = formateadiasem.parse(fe);

           }
        catch (ParseException e)
            {
            //Error, la cadena de texto no se puede convertir en fecha.
            }
        Calendar cal= Calendar.getInstance();
        cal.setTime(fecha);
        //ojo para establecer o recetear cada parte de la fecha por separado
        //cal.set(Calendar.YEAR, fecha.getYear());
        //cal.set(Calendar.MONTH, fecha.getMonth());
        //cal.set(Calendar.DAY_OF_MONTH, fecha.getDay());
        int diaInt = cal.get(Calendar.DAY_OF_WEEK);
        switch (diaInt) {
            case 1:
                dia = "Domingo";
                break;
            case 2:
                dia = "Lunes";
                break;
            case 3:
                dia = "Martes";
                break;
            case 4:
                dia = "Miercoles";
                break;
            case 5:
                dia = "Jueves";
                break;
            case 6:
                dia = "Viernes";
                break;
            case 7:
                dia = "Sabado";
                break;

        }
        return dia;
    }
 private String  fechaamericana(String fecha) {

         //resibe cadena de fecha en formato americano dd-MM-yyyy
        java.util.Date fechaestaeuropa=null;
       SimpleDateFormat formateadorestaamericano = new SimpleDateFormat("yyyy-MM-dd");
       String cadenafecha="";
        try
         {
          fechaestaeuropa = formateador.parse(fecha);
         }
        catch (ParseException e)
          {
             //Error, la cadena de texto no se puede convertir en fecha.
          }
       cadenafecha= formateadorestaamericano.format(fechaestaeuropa);
       return cadenafecha;

    }
 private String  fechaamericana(Date fecha) {
       SimpleDateFormat formateadorestaeuropa = new SimpleDateFormat("yyyy-MM-dd");
       String cadenafecha="";

       cadenafecha= formateadorestaeuropa.format(fecha);
       return cadenafecha;

    }
 private String  fechaeuropea(Date fecha) {
       SimpleDateFormat formateadorestaeuropa = new SimpleDateFormat("dd-MM-yyyy");
       String cadenafecha="";

       cadenafecha= formateadorestaeuropa.format(fecha);
       return cadenafecha;

    }
 private void imprimir(int pag)
    {
     this.objimpresora=new com_distri_folios_imprimir();
     this.objimpresora.setOneItem_cadenas_a_imprimir("PAGO DE TERMINADOS");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("Folio Pago:"+this.jtf_foliopago.getText()+"");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("Fecha:"+this.fechaeuropea(this.jdc_fechadocto.getDate())+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Genera Pago:"+variables_global.getId_empleado()+"");
    // this.objimpresora.setOneItem_cadenas_a_imprimir("Colaborador::"+this.jtf_idcolaborador.getText()+":"+this.jtf_colaboradordescribe.getText());
     //this.objimpresora.setOneItem_cadenas_a_imprimir("Folio A.:"+this.jtf_doctoanterior.getText()+"");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("F.E.Insumos.:"+this.jtf_entregainsumos.getText()+" Dias en Elaboracion: "+this.jtf_diasparapruducir.getText());
     //this.objimpresora.setOneItem_cadenas_a_imprimir("Piezas Pendientes::"+this.jtf_piezaspen.getText()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("*");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("Piezas:"+this.jtf_totalpiezas.getText()+"");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("Importe:"+this.jtf_totalmanoobra.getText()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("Letra:"+this.jtf_importepesos.getText()+"");
    this.objimpresora.setOneItem_cadenas_a_imprimir("..");
    //this.objimpresora.setOneItem_cadenas_a_imprimir("Cobrar en:"+this.jcmbx_cuentapago.getSelectedItem()+"");
    this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Recibio: ______________");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Autorizo: ______________");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("*");
     //this.objimpresora.setObjeto_tabla(jtb_documento_preparainsu);
     this.objimpresora.imprimir_all(15,pag);
    }


    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        buttonGroup1 = new javax.swing.ButtonGroup();
        buttonGroup2 = new javax.swing.ButtonGroup();
        jTabbedPane1 = new javax.swing.JTabbedPane();
        jPanel1 = new javax.swing.JPanel();
        jPanel22 = new javax.swing.JPanel();
        jLabel58 = new javax.swing.JLabel();
        jdc_fechamovefe = new com.toedter.calendar.JDateChooser();
        jLabel62 = new javax.swing.JLabel();
        jcmbx_cuenta = new javax.swing.JComboBox();
        jLabel63 = new javax.swing.JLabel();
        jcmbx_concepto = new javax.swing.JComboBox();
        jLabel25 = new javax.swing.JLabel();
        jtf_efvocantidad = new javax.swing.JTextField();
        jLabel27 = new javax.swing.JLabel();
        jtf_efvodoctoref = new javax.swing.JTextField();
        jtf_efvocantidadletra = new javax.swing.JTextField();
        jLabel26 = new javax.swing.JLabel();
        jLabel28 = new javax.swing.JLabel();
        jtf_efvoobservaciones = new javax.swing.JTextField();
        jbtn_efvoguardar = new javax.swing.JButton();
        jLabel14 = new javax.swing.JLabel();
        jtf_idelabora = new javax.swing.JTextField();
        jLabel15 = new javax.swing.JLabel();
        jtf_idconfirma = new javax.swing.JTextField();
        jtf_empleadonombrere = new javax.swing.JTextField();
        jtf_empleadonombreent = new javax.swing.JTextField();
        jtf_iddepto = new javax.swing.JTextField();
        jtf_iddeptodescribe = new javax.swing.JTextField();
        jLabel16 = new javax.swing.JLabel();
        jcmbx_departamento = new javax.swing.JComboBox();
        jLabel13 = new javax.swing.JLabel();
        jtf_codelabora = new javax.swing.JPasswordField();
        jtf_codconfirmaconteo = new javax.swing.JPasswordField();
        jPanel2 = new javax.swing.JPanel();
        jScrollPane16 = new javax.swing.JScrollPane();
        jtb_cuentaefectivo_detalle = new javax.swing.JTable(){
            public boolean isCellEditable(int rowIndex, int mColIndex) {
                return false;

            }}
            ;
            jtf_busqueda = new javax.swing.JTextField();
            jbtn_buscar = new javax.swing.JButton();
            jrb_folio = new javax.swing.JRadioButton();
            jrb_bfechab = new javax.swing.JRadioButton();
            jrb_bfolio = new javax.swing.JRadioButton();
            jrb_bidempentrego = new javax.swing.JRadioButton();
            jrb_bidemplrecibio = new javax.swing.JRadioButton();
            jLabel35 = new javax.swing.JLabel();
            jtf_busidcuenta = new javax.swing.JTextField();
            jLabel36 = new javax.swing.JLabel();
            jtf_busiddeptoorigen = new javax.swing.JTextField();
            jbtn_imprimiractual = new javax.swing.JButton();
            jLabel37 = new javax.swing.JLabel();
            jtf_total = new javax.swing.JTextField();
            jLabel38 = new javax.swing.JLabel();
            jtf_totalletra = new javax.swing.JTextField();
            jcmbx_conceptofiltro = new javax.swing.JComboBox();
            jLabel39 = new javax.swing.JLabel();
            jtf_busquedaactual = new javax.swing.JTextField();
            jPanel3 = new javax.swing.JPanel();
            jLabel29 = new javax.swing.JLabel();
            jtf_efvocambio = new javax.swing.JTextField();
            jtf_efvodoctorefup = new javax.swing.JTextField();
            jLabel30 = new javax.swing.JLabel();
            jLabel31 = new javax.swing.JLabel();
            jtf_folio = new javax.swing.JTextField();
            jbtn_efvoguardacambio = new javax.swing.JButton();
            jrbtn_cambiodev = new javax.swing.JRadioButton();
            jrbtn_cambioent = new javax.swing.JRadioButton();
            jLabel32 = new javax.swing.JLabel();
            jtf_efvoobservacionesup = new javax.swing.JTextField();
            jLabel33 = new javax.swing.JLabel();
            jtf_idcuenta = new javax.swing.JTextField();
            jLabel34 = new javax.swing.JLabel();
            jtf_iddeptoori = new javax.swing.JTextField();
            jMenuBar1 = new javax.swing.JMenuBar();
            jMenu1 = new javax.swing.JMenu();
            jmni_salir = new javax.swing.JMenuItem();
            jMenu2 = new javax.swing.JMenu();
            jmni_escape = new javax.swing.JMenuItem();

            setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
            org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(sie_invdis.Sie_invdisApp.class).getContext().getResourceMap(ventas_sie_diarioventas_cajaoperaciones.class);
            setTitle(resourceMap.getString("Form.title")); // NOI18N
            setName("Form"); // NOI18N

            jTabbedPane1.setName("jTabbedPane1"); // NOI18N

            jPanel1.setName("jPanel1"); // NOI18N

            jPanel22.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel22.border.title"))); // NOI18N
            jPanel22.setName("jPanel22"); // NOI18N

            jLabel58.setText(resourceMap.getString("jLabel58.text")); // NOI18N
            jLabel58.setName("jLabel58"); // NOI18N

            jdc_fechamovefe.setDateFormatString(resourceMap.getString("jdc_fechamovefe.dateFormatString")); // NOI18N
            jdc_fechamovefe.setName("jdc_fechamovefe"); // NOI18N

            jLabel62.setText(resourceMap.getString("jLabel62.text")); // NOI18N
            jLabel62.setName("jLabel62"); // NOI18N

            jcmbx_cuenta.setName("jcmbx_cuenta"); // NOI18N
            jcmbx_cuenta.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jcmbx_cuentaActionPerformed(evt);
                }
            });

            jLabel63.setText(resourceMap.getString("jLabel63.text")); // NOI18N
            jLabel63.setName("jLabel63"); // NOI18N

            jcmbx_concepto.setName("jcmbx_concepto"); // NOI18N
            jcmbx_concepto.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jcmbx_conceptoActionPerformed(evt);
                }
            });

            jLabel25.setText(resourceMap.getString("jLabel25.text")); // NOI18N
            jLabel25.setName("jLabel25"); // NOI18N

            jtf_efvocantidad.setText(resourceMap.getString("jtf_efvocantidad.text")); // NOI18N
            jtf_efvocantidad.setToolTipText(resourceMap.getString("jtf_efvocantidad.toolTipText")); // NOI18N
            jtf_efvocantidad.setName("jtf_efvocantidad"); // NOI18N
            jtf_efvocantidad.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jtf_efvocantidadActionPerformed(evt);
                }
            });

            jLabel27.setText(resourceMap.getString("jLabel27.text")); // NOI18N
            jLabel27.setName("jLabel27"); // NOI18N

            jtf_efvodoctoref.setText(resourceMap.getString("jtf_efvodoctoref.text")); // NOI18N
            jtf_efvodoctoref.setToolTipText(resourceMap.getString("jtf_efvodoctoref.toolTipText")); // NOI18N
            jtf_efvodoctoref.setName("jtf_efvodoctoref"); // NOI18N
            jtf_efvodoctoref.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jtf_efvodoctorefActionPerformed(evt);
                }
            });

            jtf_efvocantidadletra.setEditable(false);
            jtf_efvocantidadletra.setFont(resourceMap.getFont("jtf_efvocantidadletra.font")); // NOI18N
            jtf_efvocantidadletra.setName("jtf_efvocantidadletra"); // NOI18N

            jLabel26.setText(resourceMap.getString("jLabel26.text")); // NOI18N
            jLabel26.setName("jLabel26"); // NOI18N

            jLabel28.setText(resourceMap.getString("jLabel28.text")); // NOI18N
            jLabel28.setName("jLabel28"); // NOI18N

            jtf_efvoobservaciones.setToolTipText(resourceMap.getString("jtf_efvoobservaciones.toolTipText")); // NOI18N
            jtf_efvoobservaciones.setName("jtf_efvoobservaciones"); // NOI18N
            jtf_efvoobservaciones.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jtf_efvoobservacionesActionPerformed(evt);
                }
            });

            jbtn_efvoguardar.setIcon(resourceMap.getIcon("jbtn_efvoguardar.icon")); // NOI18N
            jbtn_efvoguardar.setText(resourceMap.getString("jbtn_efvoguardar.text")); // NOI18N
            jbtn_efvoguardar.setName("jbtn_efvoguardar"); // NOI18N
            jbtn_efvoguardar.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jbtn_efvoguardarActionPerformed(evt);
                }
            });

            jLabel14.setText(resourceMap.getString("jLabel14.text")); // NOI18N
            jLabel14.setName("jLabel14"); // NOI18N

            jtf_idelabora.setEditable(false);
            jtf_idelabora.setText(resourceMap.getString("jtf_idelabora.text")); // NOI18N
            jtf_idelabora.setName("jtf_idelabora"); // NOI18N

            jLabel15.setText(resourceMap.getString("jLabel15.text")); // NOI18N
            jLabel15.setName("jLabel15"); // NOI18N

            jtf_idconfirma.setEditable(false);
            jtf_idconfirma.setText(resourceMap.getString("jtf_idconfirma.text")); // NOI18N
            jtf_idconfirma.setName("jtf_idconfirma"); // NOI18N

            jtf_empleadonombrere.setEditable(false);
            jtf_empleadonombrere.setFont(resourceMap.getFont("jtf_empleadonombrere.font")); // NOI18N
            jtf_empleadonombrere.setName("jtf_empleadonombrere"); // NOI18N

            jtf_empleadonombreent.setEditable(false);
            jtf_empleadonombreent.setFont(resourceMap.getFont("jtf_empleadonombreent.font")); // NOI18N
            jtf_empleadonombreent.setName("jtf_empleadonombreent"); // NOI18N

            jtf_iddepto.setEditable(false);
            jtf_iddepto.setText(resourceMap.getString("jtf_iddepto.text")); // NOI18N
            jtf_iddepto.setName("jtf_iddepto"); // NOI18N

            jtf_iddeptodescribe.setEditable(false);
            jtf_iddeptodescribe.setName("jtf_iddeptodescribe"); // NOI18N

            jLabel16.setText(resourceMap.getString("jLabel16.text")); // NOI18N
            jLabel16.setName("jLabel16"); // NOI18N

            jcmbx_departamento.setName("jcmbx_departamento"); // NOI18N

            jLabel13.setText(resourceMap.getString("jLabel13.text")); // NOI18N
            jLabel13.setName("jLabel13"); // NOI18N

            jtf_codelabora.setToolTipText(resourceMap.getString("jtf_codelabora.toolTipText")); // NOI18N
            jtf_codelabora.setName("jtf_codelabora"); // NOI18N
            jtf_codelabora.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jtf_codelaboraActionPerformed(evt);
                }
            });

            jtf_codconfirmaconteo.setToolTipText(resourceMap.getString("jtf_codconfirmaconteo.toolTipText")); // NOI18N
            jtf_codconfirmaconteo.setName("jtf_codconfirmaconteo"); // NOI18N
            jtf_codconfirmaconteo.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jtf_codconfirmaconteoActionPerformed(evt);
                }
            });

            javax.swing.GroupLayout jPanel22Layout = new javax.swing.GroupLayout(jPanel22);
            jPanel22.setLayout(jPanel22Layout);
            jPanel22Layout.setHorizontalGroup(
                jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel22Layout.createSequentialGroup()
                    .addContainerGap()
                    .addGroup(jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(jPanel22Layout.createSequentialGroup()
                            .addComponent(jLabel27)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jtf_efvodoctoref, javax.swing.GroupLayout.PREFERRED_SIZE, 92, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGap(18, 18, 18)
                            .addComponent(jLabel28)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jtf_efvoobservaciones, javax.swing.GroupLayout.PREFERRED_SIZE, 222, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGap(34, 34, 34)
                            .addComponent(jbtn_efvoguardar))
                        .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel22Layout.createSequentialGroup()
                            .addGroup(jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addGroup(jPanel22Layout.createSequentialGroup()
                                    .addComponent(jLabel58)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jdc_fechamovefe, javax.swing.GroupLayout.PREFERRED_SIZE, 111, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jLabel62, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jcmbx_cuenta, javax.swing.GroupLayout.PREFERRED_SIZE, 175, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(jLabel63, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jcmbx_concepto, javax.swing.GroupLayout.PREFERRED_SIZE, 204, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel22Layout.createSequentialGroup()
                                    .addGroup(jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                        .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel22Layout.createSequentialGroup()
                                            .addGroup(jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                                .addGroup(jPanel22Layout.createSequentialGroup()
                                                    .addComponent(jLabel25)
                                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                    .addComponent(jtf_efvocantidad, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE))
                                                .addGroup(jPanel22Layout.createSequentialGroup()
                                                    .addComponent(jLabel16)
                                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                                    .addComponent(jtf_iddepto, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)))
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addGroup(jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                .addGroup(jPanel22Layout.createSequentialGroup()
                                                    .addComponent(jtf_iddeptodescribe, javax.swing.GroupLayout.PREFERRED_SIZE, 212, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                    .addComponent(jLabel13)
                                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                    .addComponent(jcmbx_departamento, javax.swing.GroupLayout.PREFERRED_SIZE, 135, javax.swing.GroupLayout.PREFERRED_SIZE))
                                                .addGroup(jPanel22Layout.createSequentialGroup()
                                                    .addComponent(jLabel26)
                                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                    .addComponent(jtf_efvocantidadletra, javax.swing.GroupLayout.PREFERRED_SIZE, 297, javax.swing.GroupLayout.PREFERRED_SIZE))))
                                        .addGroup(jPanel22Layout.createSequentialGroup()
                                            .addComponent(jLabel14)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(jtf_codelabora, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addGap(21, 21, 21)
                                            .addComponent(jtf_idelabora, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(jtf_empleadonombrere, javax.swing.GroupLayout.DEFAULT_SIZE, 39, Short.MAX_VALUE)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(jLabel15)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(jtf_codconfirmaconteo, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(jtf_idconfirma, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(jtf_empleadonombreent, javax.swing.GroupLayout.PREFERRED_SIZE, 220, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)))
                                    .addGap(87, 87, 87)))
                            .addGap(250, 250, 250)))
                    .addContainerGap())
            );
            jPanel22Layout.setVerticalGroup(
                jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel22Layout.createSequentialGroup()
                    .addContainerGap()
                    .addGroup(jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel62)
                            .addComponent(jcmbx_cuenta, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel63)
                            .addComponent(jcmbx_concepto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addComponent(jLabel58)
                        .addComponent(jdc_fechamovefe, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jtf_iddeptodescribe, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jtf_iddepto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel16)
                        .addComponent(jLabel13)
                        .addComponent(jcmbx_departamento, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel14)
                        .addComponent(jtf_idelabora, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jtf_empleadonombrere, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jtf_codelabora, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel15)
                        .addComponent(jtf_idconfirma, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jtf_empleadonombreent, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jtf_codconfirmaconteo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel25)
                        .addComponent(jtf_efvocantidad, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel26)
                        .addComponent(jtf_efvocantidadletra, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGap(13, 13, 13)
                    .addGroup(jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel27)
                        .addComponent(jtf_efvodoctoref, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel28)
                        .addComponent(jtf_efvoobservaciones, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jbtn_efvoguardar))
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            );

            jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel2.border.title"))); // NOI18N
            jPanel2.setName("jPanel2"); // NOI18N

            jScrollPane16.setName("jScrollPane16"); // NOI18N

            jtb_cuentaefectivo_detalle.setModel(this.jtable_modelo_cuentaefe_detalle);
            jtb_cuentaefectivo_detalle.setName("jtb_cuentaefectivo_detalle"); // NOI18N
            jtb_cuentaefectivo_detalle.setRowHeight(24);
            jtb_cuentaefectivo_detalle.addMouseListener(new java.awt.event.MouseAdapter() {
                public void mouseClicked(java.awt.event.MouseEvent evt) {
                    jtb_cuentaefectivo_detalleMouseClicked(evt);
                    if(evt.getClickCount() >= 1)
                    {
                        dioclickcatpreparacion(evt);
                    }
                }
            });
            jScrollPane16.setViewportView(jtb_cuentaefectivo_detalle);

            jtf_busqueda.setToolTipText(resourceMap.getString("jtf_busqueda.toolTipText")); // NOI18N
            jtf_busqueda.setName("jtf_busqueda"); // NOI18N
            jtf_busqueda.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jtf_busquedaActionPerformed(evt);
                }
            });

            jbtn_buscar.setIcon(resourceMap.getIcon("jbtn_buscar.icon")); // NOI18N
            jbtn_buscar.setText(resourceMap.getString("jbtn_buscar.text")); // NOI18N
            jbtn_buscar.setName("jbtn_buscar"); // NOI18N
            jbtn_buscar.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jbtn_buscarActionPerformed(evt);
                }
            });

            buttonGroup1.add(jrb_folio);
            jrb_folio.setText(resourceMap.getString("jrb_folio.text")); // NOI18N
            jrb_folio.setToolTipText(resourceMap.getString("jrb_folio.toolTipText")); // NOI18N
            jrb_folio.setActionCommand(resourceMap.getString("jrb_folio.actionCommand")); // NOI18N
            jrb_folio.setName("jrb_folio"); // NOI18N
            jrb_folio.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jrb_folioActionPerformed(evt);
                }
            });

            buttonGroup1.add(jrb_bfechab);
            jrb_bfechab.setText(resourceMap.getString("jrb_bfechab.text")); // NOI18N
            jrb_bfechab.setToolTipText(resourceMap.getString("jrb_bfechab.toolTipText")); // NOI18N
            jrb_bfechab.setActionCommand(resourceMap.getString("jrb_bfechab.actionCommand")); // NOI18N
            jrb_bfechab.setName("jrb_bfechab"); // NOI18N
            jrb_bfechab.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jrb_bfechabActionPerformed(evt);
                }
            });

            buttonGroup1.add(jrb_bfolio);
            jrb_bfolio.setText(resourceMap.getString("jrb_bfolio.text")); // NOI18N
            jrb_bfolio.setToolTipText(resourceMap.getString("jrb_bfolio.toolTipText")); // NOI18N
            jrb_bfolio.setActionCommand(resourceMap.getString("jrb_bfolio.actionCommand")); // NOI18N
            jrb_bfolio.setName("jrb_bfolio"); // NOI18N
            jrb_bfolio.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jrb_bfolioActionPerformed(evt);
                }
            });

            buttonGroup1.add(jrb_bidempentrego);
            jrb_bidempentrego.setText(resourceMap.getString("jrb_bidempentrego.text")); // NOI18N
            jrb_bidempentrego.setToolTipText(resourceMap.getString("jrb_bidempentrego.toolTipText")); // NOI18N
            jrb_bidempentrego.setActionCommand(resourceMap.getString("jrb_bidempentrego.actionCommand")); // NOI18N
            jrb_bidempentrego.setName("jrb_bidempentrego"); // NOI18N
            jrb_bidempentrego.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jrb_bidempentregoActionPerformed(evt);
                }
            });

            buttonGroup1.add(jrb_bidemplrecibio);
            jrb_bidemplrecibio.setText(resourceMap.getString("jrb_bidemplrecibio.text")); // NOI18N
            jrb_bidemplrecibio.setToolTipText(resourceMap.getString("jrb_bidemplrecibio.toolTipText")); // NOI18N
            jrb_bidemplrecibio.setActionCommand(resourceMap.getString("jrb_bidemplrecibio.actionCommand")); // NOI18N
            jrb_bidemplrecibio.setName("jrb_bidemplrecibio"); // NOI18N
            jrb_bidemplrecibio.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jrb_bidemplrecibioActionPerformed(evt);
                }
            });

            jLabel35.setText(resourceMap.getString("jLabel35.text")); // NOI18N
            jLabel35.setName("jLabel35"); // NOI18N

            jtf_busidcuenta.setText(resourceMap.getString("jtf_busidcuenta.text")); // NOI18N
            jtf_busidcuenta.setToolTipText(resourceMap.getString("jtf_busidcuenta.toolTipText")); // NOI18N
            jtf_busidcuenta.setName("jtf_busidcuenta"); // NOI18N

            jLabel36.setText(resourceMap.getString("jLabel36.text")); // NOI18N
            jLabel36.setName("jLabel36"); // NOI18N

            jtf_busiddeptoorigen.setToolTipText(resourceMap.getString("jtf_busiddeptoorigen.toolTipText")); // NOI18N
            jtf_busiddeptoorigen.setName("jtf_busiddeptoorigen"); // NOI18N

            jbtn_imprimiractual.setIcon(resourceMap.getIcon("jbtn_imprimiractual.icon")); // NOI18N
            jbtn_imprimiractual.setText(resourceMap.getString("jbtn_imprimiractual.text")); // NOI18N
            jbtn_imprimiractual.setName("jbtn_imprimiractual"); // NOI18N
            jbtn_imprimiractual.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jbtn_imprimiractualActionPerformed(evt);
                }
            });

            jLabel37.setText(resourceMap.getString("jLabel37.text")); // NOI18N
            jLabel37.setName("jLabel37"); // NOI18N

            jtf_total.setText(resourceMap.getString("jtf_total.text")); // NOI18N
            jtf_total.setToolTipText(resourceMap.getString("jtf_total.toolTipText")); // NOI18N
            jtf_total.setName("jtf_total"); // NOI18N

            jLabel38.setText(resourceMap.getString("jLabel38.text")); // NOI18N
            jLabel38.setName("jLabel38"); // NOI18N

            jtf_totalletra.setToolTipText(resourceMap.getString("jtf_totalletra.toolTipText")); // NOI18N
            jtf_totalletra.setName("jtf_totalletra"); // NOI18N

            jcmbx_conceptofiltro.setName("jcmbx_conceptofiltro"); // NOI18N
            jcmbx_conceptofiltro.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jcmbx_conceptofiltroActionPerformed(evt);
                }
            });

            jLabel39.setText(resourceMap.getString("jLabel39.text")); // NOI18N
            jLabel39.setName("jLabel39"); // NOI18N

            jtf_busquedaactual.setEditable(false);
            jtf_busquedaactual.setText(resourceMap.getString("jtf_busquedaactual.text")); // NOI18N
            jtf_busquedaactual.setName("jtf_busquedaactual"); // NOI18N

            javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
            jPanel2.setLayout(jPanel2Layout);
            jPanel2Layout.setHorizontalGroup(
                jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel2Layout.createSequentialGroup()
                    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                        .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel2Layout.createSequentialGroup()
                            .addComponent(jLabel37)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jtf_total, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jLabel38, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jtf_totalletra, javax.swing.GroupLayout.PREFERRED_SIZE, 373, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel2Layout.createSequentialGroup()
                            .addContainerGap()
                            .addComponent(jrb_folio)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jrb_bfechab)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jrb_bfolio)
                            .addGap(6, 6, 6)
                            .addComponent(jrb_bidempentrego)
                            .addGap(8, 8, 8)
                            .addComponent(jrb_bidemplrecibio)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jtf_busqueda, javax.swing.GroupLayout.PREFERRED_SIZE, 173, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                        .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel2Layout.createSequentialGroup()
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jbtn_buscar)
                            .addGap(66, 66, 66)
                            .addComponent(jLabel35, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jtf_busidcuenta, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jLabel36, javax.swing.GroupLayout.PREFERRED_SIZE, 53, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(jtf_busiddeptoorigen, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGap(31, 31, 31)
                            .addComponent(jbtn_imprimiractual))
                        .addGroup(jPanel2Layout.createSequentialGroup()
                            .addGap(41, 41, 41)
                            .addComponent(jLabel39)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jcmbx_conceptofiltro, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(jtf_busquedaactual, javax.swing.GroupLayout.PREFERRED_SIZE, 139, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addContainerGap(10, Short.MAX_VALUE))
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addComponent(jScrollPane16, javax.swing.GroupLayout.DEFAULT_SIZE, 1035, Short.MAX_VALUE)
                        .addContainerGap()))
            );
            jPanel2Layout.setVerticalGroup(
                jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel2Layout.createSequentialGroup()
                    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jtf_busqueda, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jbtn_buscar)
                        .addComponent(jrb_folio)
                        .addComponent(jrb_bfechab)
                        .addComponent(jrb_bfolio)
                        .addComponent(jrb_bidempentrego)
                        .addComponent(jrb_bidemplrecibio)
                        .addComponent(jLabel35)
                        .addComponent(jtf_busidcuenta, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel36)
                        .addComponent(jtf_busiddeptoorigen, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jbtn_imprimiractual))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 195, Short.MAX_VALUE)
                    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel37)
                        .addComponent(jtf_total, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel38)
                        .addComponent(jtf_totalletra, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jtf_busquedaactual, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jcmbx_conceptofiltro, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel39)))
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addGap(35, 35, 35)
                        .addComponent(jScrollPane16, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addContainerGap(25, Short.MAX_VALUE)))
            );

            jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel3.border.title"))); // NOI18N
            jPanel3.setName("jPanel3"); // NOI18N

            jLabel29.setText(resourceMap.getString("jLabel29.text")); // NOI18N
            jLabel29.setName("jLabel29"); // NOI18N

            jtf_efvocambio.setText(resourceMap.getString("jtf_efvocambio.text")); // NOI18N
            jtf_efvocambio.setToolTipText(resourceMap.getString("jtf_efvocambio.toolTipText")); // NOI18N
            jtf_efvocambio.setName("jtf_efvocambio"); // NOI18N
            jtf_efvocambio.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jtf_efvocambioActionPerformed(evt);
                }
            });

            jtf_efvodoctorefup.setText(resourceMap.getString("jtf_efvodoctorefup.text")); // NOI18N
            jtf_efvodoctorefup.setToolTipText(resourceMap.getString("jtf_efvodoctorefup.toolTipText")); // NOI18N
            jtf_efvodoctorefup.setName("jtf_efvodoctorefup"); // NOI18N
            jtf_efvodoctorefup.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jtf_efvodoctorefupActionPerformed(evt);
                }
            });

            jLabel30.setText(resourceMap.getString("jLabel30.text")); // NOI18N
            jLabel30.setName("jLabel30"); // NOI18N

            jLabel31.setText(resourceMap.getString("jLabel31.text")); // NOI18N
            jLabel31.setName("jLabel31"); // NOI18N

            jtf_folio.setEditable(false);
            jtf_folio.setName("jtf_folio"); // NOI18N

            jbtn_efvoguardacambio.setIcon(resourceMap.getIcon("jbtn_efvoguardacambio.icon")); // NOI18N
            jbtn_efvoguardacambio.setText(resourceMap.getString("jbtn_efvoguardacambio.text")); // NOI18N
            jbtn_efvoguardacambio.setName("jbtn_efvoguardacambio"); // NOI18N
            jbtn_efvoguardacambio.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jbtn_efvoguardacambioActionPerformed(evt);
                }
            });

            buttonGroup2.add(jrbtn_cambiodev);
            jrbtn_cambiodev.setText(resourceMap.getString("jrbtn_cambiodev.text")); // NOI18N
            jrbtn_cambiodev.setToolTipText(resourceMap.getString("jrbtn_cambiodev.toolTipText")); // NOI18N
            jrbtn_cambiodev.setActionCommand(resourceMap.getString("jrbtn_cambiodev.actionCommand")); // NOI18N
            jrbtn_cambiodev.setName("jrbtn_cambiodev"); // NOI18N
            jrbtn_cambiodev.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jrbtn_cambiodevActionPerformed(evt);
                }
            });

            buttonGroup2.add(jrbtn_cambioent);
            jrbtn_cambioent.setText(resourceMap.getString("jrbtn_cambioent.text")); // NOI18N
            jrbtn_cambioent.setToolTipText(resourceMap.getString("jrbtn_cambioent.toolTipText")); // NOI18N
            jrbtn_cambioent.setActionCommand(resourceMap.getString("jrbtn_cambioent.actionCommand")); // NOI18N
            jrbtn_cambioent.setName("jrbtn_cambioent"); // NOI18N
            jrbtn_cambioent.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jrbtn_cambioentActionPerformed(evt);
                }
            });

            jLabel32.setText(resourceMap.getString("jLabel32.text")); // NOI18N
            jLabel32.setName("jLabel32"); // NOI18N

            jtf_efvoobservacionesup.setEditable(false);
            jtf_efvoobservacionesup.setToolTipText(resourceMap.getString("jtf_efvoobservacionesup.toolTipText")); // NOI18N
            jtf_efvoobservacionesup.setName("jtf_efvoobservacionesup"); // NOI18N
            jtf_efvoobservacionesup.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jtf_efvoobservacionesupActionPerformed(evt);
                }
            });

            jLabel33.setText(resourceMap.getString("jLabel33.text")); // NOI18N
            jLabel33.setName("jLabel33"); // NOI18N

            jtf_idcuenta.setEditable(false);
            jtf_idcuenta.setName("jtf_idcuenta"); // NOI18N

            jLabel34.setText(resourceMap.getString("jLabel34.text")); // NOI18N
            jLabel34.setName("jLabel34"); // NOI18N

            jtf_iddeptoori.setEditable(false);
            jtf_iddeptoori.setName("jtf_iddeptoori"); // NOI18N

            javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
            jPanel3.setLayout(jPanel3Layout);
            jPanel3Layout.setHorizontalGroup(
                jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel3Layout.createSequentialGroup()
                    .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(jPanel3Layout.createSequentialGroup()
                            .addContainerGap()
                            .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jbtn_efvoguardacambio)
                                .addGroup(jPanel3Layout.createSequentialGroup()
                                    .addComponent(jrbtn_cambiodev)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(jrbtn_cambioent)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(jLabel29)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jtf_efvocambio, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE))))
                        .addGroup(jPanel3Layout.createSequentialGroup()
                            .addComponent(jLabel30)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jtf_efvodoctorefup, javax.swing.GroupLayout.PREFERRED_SIZE, 92, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGroup(jPanel3Layout.createSequentialGroup()
                            .addContainerGap()
                            .addComponent(jLabel31, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jtf_folio, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jLabel33, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jtf_idcuenta, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jLabel34, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jtf_iddeptoori, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGroup(jPanel3Layout.createSequentialGroup()
                            .addComponent(jLabel32)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jtf_efvoobservacionesup, javax.swing.GroupLayout.PREFERRED_SIZE, 222, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addContainerGap(36, Short.MAX_VALUE))
            );
            jPanel3Layout.setVerticalGroup(
                jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel3Layout.createSequentialGroup()
                    .addContainerGap()
                    .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel31)
                        .addComponent(jtf_folio, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel33)
                        .addComponent(jtf_idcuenta, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel34)
                        .addComponent(jtf_iddeptoori, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 17, Short.MAX_VALUE)
                    .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel32)
                        .addComponent(jtf_efvoobservacionesup, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
                            .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jLabel30)
                                .addComponent(jtf_efvodoctorefup, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jrbtn_cambiodev)
                                .addComponent(jrbtn_cambioent))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(jbtn_efvoguardacambio))
                        .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
                            .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                .addComponent(jtf_efvocambio, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel29))
                            .addGap(37, 37, 37))))
            );

            javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
            jPanel1.setLayout(jPanel1Layout);
            jPanel1Layout.setHorizontalGroup(
                jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel1Layout.createSequentialGroup()
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(jPanel1Layout.createSequentialGroup()
                            .addContainerGap()
                            .addComponent(jPanel22, javax.swing.GroupLayout.PREFERRED_SIZE, 713, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addContainerGap())
            );
            jPanel1Layout.setVerticalGroup(
                jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                    .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(jPanel22, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addContainerGap())
            );

            jTabbedPane1.addTab(resourceMap.getString("jPanel1.TabConstraints.tabTitle"), jPanel1); // NOI18N

            jMenuBar1.setName("jMenuBar1"); // NOI18N

            jMenu1.setText(resourceMap.getString("jMenu1.text")); // NOI18N
            jMenu1.setName("jMenu1"); // NOI18N

            jmni_salir.setIcon(resourceMap.getIcon("jmni_salir.icon")); // NOI18N
            jmni_salir.setText(resourceMap.getString("jmni_salir.text")); // NOI18N
            jmni_salir.setName("jmni_salir"); // NOI18N
            jmni_salir.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jmni_salirActionPerformed(evt);
                }
            });
            jMenu1.add(jmni_salir);

            jMenuBar1.add(jMenu1);

            jMenu2.setText(resourceMap.getString("jMenu2.text")); // NOI18N
            jMenu2.setName("jMenu2"); // NOI18N

            jmni_escape.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_ESCAPE, 0));
            jmni_escape.setText(resourceMap.getString("jmni_escape.text")); // NOI18N
            jmni_escape.setName("jmni_escape"); // NOI18N
            jmni_escape.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jmni_escapeActionPerformed(evt);
                }
            });
            jMenu2.add(jmni_escape);

            jMenuBar1.add(jMenu2);

            setJMenuBar(jMenuBar1);

            javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
            getContentPane().setLayout(layout);
            layout.setHorizontalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGap(0, 1076, Short.MAX_VALUE)
                .addComponent(jTabbedPane1)
            );
            layout.setVerticalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGap(0, 538, Short.MAX_VALUE)
                .addGroup(layout.createSequentialGroup()
                    .addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 507, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(31, Short.MAX_VALUE))
            );

            pack();
        }// </editor-fold>//GEN-END:initComponents

    private void jcmbx_cuentaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jcmbx_cuentaActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_jcmbx_cuentaActionPerformed

    private void jcmbx_conceptoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jcmbx_conceptoActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_jcmbx_conceptoActionPerformed

    private void jtf_efvocantidadActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_efvocantidadActionPerformed
        // TODO add your handling code here:
        this.jtf_efvodoctoref.requestFocus();
        this.jtf_efvocantidadletra.setText(PesosMN(Float.valueOf(this.jtf_efvocantidad.getText().trim().replace(",", ""))));
        this.jtf_efvodoctoref.requestFocus();
}//GEN-LAST:event_jtf_efvocantidadActionPerformed

    private void jtf_efvodoctorefActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_efvodoctorefActionPerformed
        // TODO add your handling code here:
        this.jtf_efvoobservaciones.requestFocus();
}//GEN-LAST:event_jtf_efvodoctorefActionPerformed

    private void jtf_efvoobservacionesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_efvoobservacionesActionPerformed
        // TODO add your handling code here:
        this.jbtn_efvoguardar.requestFocus();
}//GEN-LAST:event_jtf_efvoobservacionesActionPerformed

    private void jbtn_efvoguardarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_efvoguardarActionPerformed
        // TODO add your handling code here:
        int indi=this.jcmbx_cuenta.getSelectedIndex();

        this.jtf_efvocantidadletra.setText(PesosMN(Float.valueOf(this.jtf_efvocantidad.getText().trim().replace(",", ""))));
        if((indi>0)&& (this.jtf_efvocantidad.getText().length()>0)) {
            if(JOptionPane.showConfirmDialog(null, "<html>Estan estan Correcto sus Datos:?<h2><br>Cuenta:"+this.jcmbx_cuenta.getSelectedItem()+"<br>Concepto:"+this.jcmbx_concepto.getSelectedItem()+"<br>Cantidad$:"+this.jtf_efvocantidad.getText()+"<br>Ref:"+this.jtf_efvodoctoref.getText()+"<br>Emp. Entrega:"+this.jtf_empleadonombrere.getText()+"<br>Emp. Recibe:"+this.jtf_empleadonombreent.getText()+"</h2></html>")==0) {
                String arreglo_cuenta[]=this.jcmbx_cuenta.getSelectedItem().toString().split(":");
                String arreglo_acepto[]=this.jcmbx_concepto.getSelectedItem().toString().split(":");
                String arreglo_deptoorig=this.jtf_iddepto.getText();
                String arreglo_deptodest[]=this.jcmbx_departamento.getSelectedItem().toString().split(":");
                String arreglo_empleado=this.jtf_idelabora.getText();

                String texto="select * from x1_supervision_departamen_caja_cuentasmov(1,'"+this.fechaamericana(this.jdc_fechamovefe.getDate())+"','"+""+"','"+this.jtf_efvodoctoref.getText().trim().toUpperCase()+".','"+arreglo_empleado+"',"+this.jtf_efvocantidad.getText().trim().replace(",", "")+",'"+arreglo_cuenta[0]+"','"+arreglo_acepto[0]+"','"+this.jtf_efvoobservaciones.getText().toUpperCase().trim()+".','"+arreglo_deptoorig+"','"+arreglo_deptodest[0]+"','"+this.jtf_idconfirma.getText()+"')";

                System.out.println(texto);
                try {
                    rs=x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
                    while (rs.next()) {
                        if (rs.getInt(1) > 0) {
                            JOptionPane.showMessageDialog(null,"Movimiento "+rs.getInt(1)+"Generado Correctamente", "Sistema Integral(Caja) : Confirmacion",1);
                            this.imprimir_efvocomprobante(String.valueOf(rs.getInt(1)));
                            //                     this.carga_datos_cuentaefe();
                        } else {
                            JOptionPane.showMessageDialog(null," Error Verifique sus Datos", "Sistema Integral(Caja) : Error",1);
                        }
                    }
                } catch(Exception e) {
                    System.out.println(e.getMessage());
                    JOptionPane.showMessageDialog(null," Hoja de Costo Incorrecta ", "Sistema Integral(pago terminados) : Error",1);
                }
            }
        } else {
            JOptionPane.showMessageDialog(null,"Verifique Cuenta Pago o Importe Efvo", "Sistema Integral(Pago terminados) : Error",1);
        }
    }//GEN-LAST:event_jbtn_efvoguardarActionPerformed

    private void jtf_codelaboraActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_codelaboraActionPerformed
        // TODO add your handling code here:

        this.carga_datos_emprealiza(this.jtf_codelabora.getText().trim());
}//GEN-LAST:event_jtf_codelaboraActionPerformed

    private void jtf_codconfirmaconteoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_codconfirmaconteoActionPerformed
        // TODO add your handling code here:
        this.carga_datos_empsupervisa(this.jtf_codconfirmaconteo.getText().trim());
}//GEN-LAST:event_jtf_codconfirmaconteoActionPerformed

    private void jtf_busquedaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_busquedaActionPerformed
        // TODO add your handling code here:
        this.jbtn_buscarActionPerformed(evt);
}//GEN-LAST:event_jtf_busquedaActionPerformed

    private void jbtn_buscarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_buscarActionPerformed
        // TODO add your handling code here:
        // this.jtf_busqueda.getText();
        String fechaa="";
        if(JOptionPane.showConfirmDialog(null, "Estan Correctos sus Datos?")==0) {
            if(buscamp==3) {
                fechaa=this.fechaamericana(this.jtf_busqueda.getText().trim().replace("/", "-"));
                this.carga_datos_cuentaefe_movimientos(buscamp, this.jtf_busidcuenta.getText(),this.jtf_busiddeptoorigen.getText(),fechaa);
                this.jtf_busquedaactual.setText(fechaa);
            } else {
                this.carga_datos_cuentaefe_movimientos(buscamp, this.jtf_busidcuenta.getText(),this.jtf_busiddeptoorigen.getText(),this.jtf_busqueda.getText());
                this.jtf_busquedaactual.setText(this.jtf_busqueda.getText());
            }

        }
}//GEN-LAST:event_jbtn_buscarActionPerformed

    private void jrb_folioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jrb_folioActionPerformed
        // TODO add your handling code here:

        buscamp=Integer.parseInt(evt.getActionCommand().toString());
}//GEN-LAST:event_jrb_folioActionPerformed

    private void jrb_bfechabActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jrb_bfechabActionPerformed
        // TODO add your handling code here:
        buscamp=Integer.parseInt(evt.getActionCommand().toString());
}//GEN-LAST:event_jrb_bfechabActionPerformed

    private void jrb_bfolioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jrb_bfolioActionPerformed
        // TODO add your handling code here:
        buscamp=Integer.parseInt(evt.getActionCommand().toString());
}//GEN-LAST:event_jrb_bfolioActionPerformed

    private void jrb_bidempentregoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jrb_bidempentregoActionPerformed
        // TODO add your handling code here:
        buscamp=Integer.parseInt(evt.getActionCommand().toString());
}//GEN-LAST:event_jrb_bidempentregoActionPerformed

    private void jrb_bidemplrecibioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jrb_bidemplrecibioActionPerformed
        // TODO add your handling code here:
        buscamp=Integer.parseInt(evt.getActionCommand().toString());
}//GEN-LAST:event_jrb_bidemplrecibioActionPerformed

    private void jbtn_imprimiractualActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_imprimiractualActionPerformed
        // TODO add your handling code here:
        this.imprimir_efvoreporte("0");
}//GEN-LAST:event_jbtn_imprimiractualActionPerformed

    private void jcmbx_conceptofiltroActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jcmbx_conceptofiltroActionPerformed
        // TODO add your handling code here:
        //this.jcmbx_tiendaclie.requestFocus();
        if(combolisto>0)
        {
          String arreglo_concepto[]=this.jcmbx_conceptofiltro.getSelectedItem().toString().split(":");
         this.carga_datos_cuentaefe_movimientos(9,this.jtf_busidcuenta.getText(),this.jtf_busiddeptoorigen.getText(),"id_concepto="+arreglo_concepto[0]+" and fecha_aplica=''"+this.jtf_busquedaactual.getText()+"''");
        }
}//GEN-LAST:event_jcmbx_conceptofiltroActionPerformed

    private void jtf_efvocambioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_efvocambioActionPerformed
        // TODO add your handling code here:
        this.jbtn_efvoguardacambio.requestFocus();
}//GEN-LAST:event_jtf_efvocambioActionPerformed

    private void jtf_efvodoctorefupActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_efvodoctorefupActionPerformed
        // TODO add your handling code here:
        this.jtf_efvocambio.requestFocus();
}//GEN-LAST:event_jtf_efvodoctorefupActionPerformed

    private void jbtn_efvoguardacambioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_efvoguardacambioActionPerformed
        // TODO add your handling code here:
        float cantidad=Float.valueOf(this.jtf_efvocambio.getText().toString())*cambiomm;
        if(this.jtf_folio.getText().length()>0) {
            if(JOptionPane.showConfirmDialog(null, "<html>Estan estan Correcto sus Datos:?<h2><br>Folio:"+this.jtf_folio.getText()+"<br>Descripcion:"+this.jtf_efvoobservacionesup.getText()+"<br>Cambio/Reposicion$:"+this.jtf_efvocambio.getText()+"<br>Ref:"+this.jtf_efvodoctoref.getText()+"</h2></html>")==0) {

                String texto="select * from x1_supervision_departamen_caja_cuentasmov_cambio(1,'"+this.jtf_folio.getText()+"','"+this.jtf_efvodoctorefup.getText().trim().toUpperCase()+".',"+cantidad+",'"+this.jtf_idcuenta.getText().trim().replace(",", "")+"','"+this.jtf_efvoobservacionesup.getText().toUpperCase().trim()+"','"+this.jtf_iddeptoori.getText()+"','','')";

                System.out.println(texto);
                try {
                    rs=x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
                    while (rs.next()) {
                        if (rs.getInt(1) > 0) {
                            JOptionPane.showMessageDialog(null,"Movimiento "+rs.getInt(1)+"Actualizado Correctamente", "Sistema Integral(Caja) : Confirmacion",1);
                            this.jtf_folio.setText("");
                            this.jtf_efvocambio.setText("0");
                            //                     this.carga_datos_cuentaefe();
                        } else {
                            JOptionPane.showMessageDialog(null," Error Verifique sus Datos", "Sistema Integral(Caja) : Error",1);
                        }
                    }
                } catch(Exception e) {
                    System.out.println(e.getMessage());
                    JOptionPane.showMessageDialog(null," Hoja de Costo Incorrecta ", "Sistema Integral(pago terminados) : Error",1);
                }
            }
        } else {
            JOptionPane.showMessageDialog(null,"Elija folio a Modificar", "Sistema Integral(Pago terminados) : Error",1);
        }
}//GEN-LAST:event_jbtn_efvoguardacambioActionPerformed

    private void jrbtn_cambiodevActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jrbtn_cambiodevActionPerformed
        // TODO add your handling code here:
        cambiomm=Integer.parseInt(evt.getActionCommand().toString());
}//GEN-LAST:event_jrbtn_cambiodevActionPerformed

    private void jrbtn_cambioentActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jrbtn_cambioentActionPerformed
        // TODO add your handling code here:
        cambiomm=Integer.parseInt(evt.getActionCommand().toString());
}//GEN-LAST:event_jrbtn_cambioentActionPerformed

    private void jtf_efvoobservacionesupActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_efvoobservacionesupActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_jtf_efvoobservacionesupActionPerformed

    private void jmni_salirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jmni_salirActionPerformed
        // TODO add your handling code here:
          if(JOptionPane.showConfirmDialog(null, "Desea Salir?")==0)
        {
              this.dispose();
          }
    }//GEN-LAST:event_jmni_salirActionPerformed

    private void jmni_escapeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jmni_escapeActionPerformed
        // TODO add your handling code here:
        this.jmni_salirActionPerformed(evt);
    }//GEN-LAST:event_jmni_escapeActionPerformed
 private void jtb_cuentaefectivo_detalleMouseClicked(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
    }
    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new ventas_sie_diarioventas_cajaoperaciones().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.ButtonGroup buttonGroup1;
    private javax.swing.ButtonGroup buttonGroup2;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel25;
    private javax.swing.JLabel jLabel26;
    private javax.swing.JLabel jLabel27;
    private javax.swing.JLabel jLabel28;
    private javax.swing.JLabel jLabel29;
    private javax.swing.JLabel jLabel30;
    private javax.swing.JLabel jLabel31;
    private javax.swing.JLabel jLabel32;
    private javax.swing.JLabel jLabel33;
    private javax.swing.JLabel jLabel34;
    private javax.swing.JLabel jLabel35;
    private javax.swing.JLabel jLabel36;
    private javax.swing.JLabel jLabel37;
    private javax.swing.JLabel jLabel38;
    private javax.swing.JLabel jLabel39;
    private javax.swing.JLabel jLabel58;
    private javax.swing.JLabel jLabel62;
    private javax.swing.JLabel jLabel63;
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenu jMenu2;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel22;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JScrollPane jScrollPane16;
    private javax.swing.JTabbedPane jTabbedPane1;
    private javax.swing.JButton jbtn_buscar;
    private javax.swing.JButton jbtn_efvoguardacambio;
    private javax.swing.JButton jbtn_efvoguardar;
    private javax.swing.JButton jbtn_imprimiractual;
    private javax.swing.JComboBox jcmbx_concepto;
    private javax.swing.JComboBox jcmbx_conceptofiltro;
    private javax.swing.JComboBox jcmbx_cuenta;
    private javax.swing.JComboBox jcmbx_departamento;
    private com.toedter.calendar.JDateChooser jdc_fechamovefe;
    private javax.swing.JMenuItem jmni_escape;
    private javax.swing.JMenuItem jmni_salir;
    private javax.swing.JRadioButton jrb_bfechab;
    private javax.swing.JRadioButton jrb_bfolio;
    private javax.swing.JRadioButton jrb_bidempentrego;
    private javax.swing.JRadioButton jrb_bidemplrecibio;
    private javax.swing.JRadioButton jrb_folio;
    private javax.swing.JRadioButton jrbtn_cambiodev;
    private javax.swing.JRadioButton jrbtn_cambioent;
    private javax.swing.JTable jtb_cuentaefectivo_detalle;
    private javax.swing.JTextField jtf_busidcuenta;
    private javax.swing.JTextField jtf_busiddeptoorigen;
    private javax.swing.JTextField jtf_busqueda;
    private javax.swing.JTextField jtf_busquedaactual;
    private javax.swing.JPasswordField jtf_codconfirmaconteo;
    private javax.swing.JPasswordField jtf_codelabora;
    private javax.swing.JTextField jtf_efvocambio;
    private javax.swing.JTextField jtf_efvocantidad;
    private javax.swing.JTextField jtf_efvocantidadletra;
    private javax.swing.JTextField jtf_efvodoctoref;
    private javax.swing.JTextField jtf_efvodoctorefup;
    private javax.swing.JTextField jtf_efvoobservaciones;
    private javax.swing.JTextField jtf_efvoobservacionesup;
    private javax.swing.JTextField jtf_empleadonombreent;
    private javax.swing.JTextField jtf_empleadonombrere;
    private javax.swing.JTextField jtf_folio;
    private javax.swing.JTextField jtf_idconfirma;
    private javax.swing.JTextField jtf_idcuenta;
    private javax.swing.JTextField jtf_iddepto;
    private javax.swing.JTextField jtf_iddeptodescribe;
    private javax.swing.JTextField jtf_iddeptoori;
    private javax.swing.JTextField jtf_idelabora;
    private javax.swing.JTextField jtf_total;
    private javax.swing.JTextField jtf_totalletra;
    // End of variables declaration//GEN-END:variables
private com_distri_folios_imprimir objimpresora;
}
